<template>
  <div class="app-container">
    <h2>父组件</h2>
    <p>父组件的车： {{ car }}</p>
    <p>子组件的玩具： {{ toy }}</p>
    <Child :sendToy="getToy" :car="car"/>
  </div>
</template>

<script lang="ts" setup>
import { ref } from "vue"
import Child from './child.vue'
let car = ref('奔驰')
let toy = ref('')
function getToy(value:string){
  toy.value = value  
}
</script>

<style lang="scss" scoped>
</style>
